package com.zgw.his.emr.workbench.action;

import org.eclipse.jface.action.Action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;

import com.zgw.his.emr.util.print.PrintPreviewDlg;
import com.zgw.his.emr.workbench.DefaultContainer;
import com.zgw.his.emr.workbench.NavigationView;

public class PrintAction extends Action {
	public static final String ID = "com.zgw.his.emr.workbench.action.PrintAction";

	public PrintAction() {
		super("打印");
		setId(ID);
	}

	@Override
	public void run() {
		DefaultContainer cont = NavigationView.container;
		PrintPreviewDlg dlg = new PrintPreviewDlg(Display.getCurrent()
				.getActiveShell(), SWT.NONE, cont.getPages());
		dlg.open();
	}
}
